package cn.itcast.zt.java8.model.factory.staticFactory;

/**
 * video工厂
 * create by zhangtian105 on 2021/8/3
 */
public class VideoFactory {
    public static Video getVideo(Class<?> clazz) {
        Video video = null ;

        try {
            video = (Video) Class.forName(clazz.getName()).newInstance() ;
        }catch (Exception e) {
            e.printStackTrace();
        }

        return video ;
    }
}
